﻿@model Capokun.Models.Song
@{
    ViewBag.Title = "Editer la chanson: " + @Model.SongId;
    Layout = "~/Views/Shared/_Layout_fr-FR.cshtml";
}
<section id="content" class="body">
    <script>
        $(function () {
            $("#tabs").tabs({ selected: 0 });
        });
        $(document).ready(function () {
            $('a[href|="#tabs-1"]').click(function () {
                window.location = "@Url.Action("All")";
            });
            $('a[href|="#tabs-2"]').click(function () {
                window.location = "@Url.Action("Favorites")";
            });
            $('a[href|="#tabs-3"]').click(function () {
                window.location = "@Url.Action("Create")";
            });
        });

    </script>
    <div id="tabs">
        <ul>
            <li><a href="#tabs-1">Tous</a></li>
            <li><a href="#tabs-2">Favoris</a></li>
            <li><a href="#tabs-3">Créer une nouvelle chanson</a></li>
        </ul>
        <div id="tabs-1">
            <script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
            <script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
            @using (Html.BeginForm())
            {
                @Html.ValidationSummary(true)
                <fieldset>
                    <legend></legend>
                    <div class="editor-label">
                        Edité par <span class="redStar">*</span>
                    </div>
                    <div class="editor-field">
                        <fb:login-button data-show-faces="false" autologoutlink='false' perms='email,user_birthday,status_update,publish_stream'
                            id="fbLogingButton"></fb:login-button>
                        <div id="fbTextWithLoginButton">
                            L'édition d'une chanson nécessite une connexion à un compte Facebook</div>
                        <div id="fbProfile">
                            <img id="loggedFbPicture" alt="fbPic" />
                            <div id="loggedFbName">
                            </div>
                        </div>
                        <input id="SubmittedBy" class="hiddenField" name="SubmittedBy" data-val-required="L'édition d'une chanson nécessite une connexion à un compte Facebook"
                            data-val="true" />
                        <span class="field-validation-valid" data-valmsg-replace="true" data-valmsg-for="SubmittedBy">
                        </span>
                    </div>
                    @*          <div class="editor-label">
                        Titre en Portugais (ne peut être modifié)
                    </div>
                    <div class="editor-field">
                        <input class="hiddenField" value="@Model.SongId" name="SongId" id="SongId" />
                        <input disabled="disabled" value="@Model.SongId" type="text" />
                    </div>
                    <div class="editor-label">
                        Titre en français
                    </div>
                    <div class="editor-field">
                        <input value="@Model.SongId_fr" type="text" name="SongId_fr" id="SongId_fr" />
                    </div>*@
                    <div class="editor-labelTwoCols">
                        <div class="editor-label">
                            Titre en Portugais (ne peut être modifié)
                        </div>
                        <div class="editor-label">
                           Titre en français
                        </div>
                    </div>
                    <div class="editor-fieldTwoCols">
                        <div class="editor-field">
                            <input class="hiddenField" value="@Model.SongId" name="SongId" id="SongId" />
                            <input disabled="disabled" value="@Model.SongId" type="text" />
                        </div>
                        <div class="editor-field">
                            <input value="@Model.SongId_fr" type="text" name="SongId_fr" id="SongId_fr" />
                        </div>
                    </div>



                    <div class="editor-label">
                        Lien Html (embed)
                    </div>
                    <div class="editor-field">
                        @Html.TextAreaFor(model => model.Link)
                        @Html.ValidationMessageFor(model => model.Link)
                    </div>
                    <div class="editor-labelTwoCols">
                        <div class="editor-label">
                            Contenu en portugais <span class="redStar">*</span>
                        </div>
                        <div class="editor-label">
                            Contenu en français
                        </div>
                    </div>
                    @*    <div class="editor-field">
                        @Html.TextAreaFor(model => model.Content)
                        @Html.ValidationMessageFor(model => model.Content)
                    </div>*@
                    <div class="editor-fieldTwoCols">
                        <div class="editor-field">
                            <textarea id="Content" cols="50" rows="15" name="Content" data-val-required="Le champ Contenu en portugais est requis."
                                data-val="true" cols="20" class="valid">@Model.Content</textarea>
                            <span data-valmsg-replace="true" data-valmsg-for="Content" class="field-validation-valid">
                            </span>
                        </div>
                        <div class="editor-field">
                            <textarea id="Content_fr" cols="50" rows="15" name="Content_fr" data-val="true" cols="20"
                                class="valid">@Model.Content_fr</textarea>
                            <span data-valmsg-replace="true" data-valmsg-for="Content" class="field-validation-valid">
                            </span>
                        </div>
                    </div>
                    <div class="editor-label">
                        <input type="submit" value="Envoyer" />
                    </div>
                </fieldset>
           
            }
        </div>
        <div id="tabs-2">
        </div>
        <div id="tabs-3">
        </div>
    </div>
</section>
<section id="contentMobile" class="body">
    Appareil mobile détecté!
<br /> <a href="@Url.Content("~/App_FR.htm")" >Passer à l'application mobile here</a>
</section>
